package com.frxuexi.lib_base.room

import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import dagger.hilt.android.qualifiers.ApplicationContext

@Database(entities = [User::class,AskLeave::class], version = 1, exportSchema = false)
abstract class AppDatabase:RoomDatabase() {
    abstract fun userDao():UserDao
    abstract fun askDao():AskDao

    companion object{
        fun init(@ApplicationContext context: Context):AppDatabase{
            return Room.databaseBuilder(context,AppDatabase::class.java,"mdm2205").build()
        }
    }
}